package service

import (
	"context"
	"cronjob_work/internal/model/entity"
)

type ITaskServer interface {
	TaskServerGetById(ctx context.Context, serviceId int) (*entity.PpTaskServer, error)
	UpdateStatus(ctx context.Context, serviceId int, status int) error
}

var localTaskServer ITaskServer

func TaskServer() ITaskServer {
	if localTaskServer == nil {
		panic("implement not found for interface ITaskServer, forgot register?")
	}

	return localTaskServer
}

func RegisterTaskServer(i ITaskServer) {
	localTaskServer = i
}
